package com.banmao.algorithm.No201To300.No235;

public class Answer {

    public static void main(String[] args) {

        Solution1 solution = new Solution1();

        TreeNode root = new TreeNode(6, new TreeNode(2, new TreeNode(0), new TreeNode(4, new TreeNode(3), new TreeNode(5))),
                new TreeNode(8, new TreeNode(7), new TreeNode(9)));

        TreeNode res = solution.lowestCommonAncestor(root, new TreeNode(2), new TreeNode(4));

        System.out.println(res.val);

    }

}
